package cn.bj.xd.boot.autoconfigure;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import java.util.Map;

@Data
@Validated
@ConfigurationProperties(prefix = "mingdao")
public class MdyProperties {
    private boolean enabled;
    private Map<String, ApplicationConfig> application;

    @Data
    public static class ApplicationConfig {
        @NotBlank
        private String address;
        @NotBlank
        private String apiKey;
        @NotBlank
        private String sign;
    }
}
